import java.util.Scanner;

/**
 * Created With IntelliJ IDEA
 * Description:牛客网:HJ59 找出字符串中第一个只出现一次的字符
 * <a href="https://www.nowcoder.com/practice/e896d0f82f1246a3aa7b232ce38029d4?tpId=37&&tqId=21282&rp=1&ru=/activity/oj&qru=/ta/huawei/question-ranking">...</a>
 * User: DELL
 * Data: 2023-04-18
 * Time: 13:43
 */
public class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str = scanner.nextLine();
        int[] temp = new int[129];
        //统计每个单词出现的次数
        for (char ch : str.toCharArray()) {
            temp[(int)ch]++;
        }
        //找到第一个只出现一次的字符
        for (char ch : str.toCharArray()) {
            if (temp[(int)ch] == 1) {
                System.out.println(ch);
                return;
            }
        }
        System.out.println(-1);
    }
}
